package ua.mykola.calc;

public class Calculator {
	public double calculate(Character c, double op1, double op2) {
		switch (c) {
		case '+':
			return op1 + op2;
		case '-':
			return op1 - op2;
		case '*':
			return op1 * op2;
		case '/':
			return op1 / op2;
		default:
			throw new UnsupportedOperationException();
		}
	}
}
